<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
	<title>SIM卡绑定</title>
	<link rel="stylesheet" type="text/css" href="../../css/style.css">
	<script type="text/javascript" src="../../js/jquery-1.8.2.js"></script>
	<script type="text/javascript" src="../../js/dialog/jquery.artDialog.source.js?skin=default"></script>
	<script type="text/javascript" src="../../js/dialog/plugins/iframeTools.source.js"></script>
	<script type="text/javascript" src="../../js/jquery.ztree.all-3.5.min.js"></script>
	<script type="text/javascript" src="../../js/datepicker/WdatePicker.js"></script>
	<script type="text/javascript" src="../../js/jquery.form.js"></script>
	<script type="text/javascript" src="../../js/jquery.page.js"></script>
	<script type="text/javascript" src="../../js/base.js"></script>
</head>
<body class="app">
	<h3>SIM卡绑定</h3>
	<form class="search" id="search" action="simbind_search.action" name="search" method="post">
		<div class="tbdiv">
		<table>
			<tr>
				<th>电梯ID：</th>
				<td><input type="text" class="inputText" name="eleCode"/></td>
				<th>SIM卡ID：</th>
				<td><input type="text" class="inputText" name="simCard"/></td>
				<td><input type="submit" value="查询" class="inputButton"/></td>
			</tr>
		</table>
		</div>
	</form>
	
	<form id="save" name="save" action="simbind_save.action" method="post">
		<input type="hidden" name="eleBasicId" />
		<input type="hidden" name="eleCode" />
		<dl class="view">
			<dt>电梯号码：</dt>
			<dd><label name="eleCode"></label></dd>
			<dt>电梯名称：</dt>
			<dd><label name="eleName"></label></dd>
			<dt>注册代码：</dt>
			<dd><label name="eleBasicRegNum"></label></dd>
			<dt>电梯型号：</dt>
			<dd><label name="eleBasicType"></label></dd>
			<dt>SIM卡：</dt>
			<dd><input type="text" class="inputText" style="width:95%" name="simCard" /></dd>
			<dt>协议：</dt>
			<dd><select name="pact" class="inputText" style="width:100%;padding:2px;"></select></dd>
			<div class="cl"></div>
		</dl>
		<div style="text-align:right;margin-top:5px;">
			<input type="submit" class="inputButton" value="保存"/>
		</div>
	</form>
		
	<script type="text/javascript">
	$(function(){
		$('select[name=pact]').selectload('../../common/code.action','code','codedesc',{codepid:'53'});
		$('#search').ajaxForm({
			dataType:'json',
			success:function(data){
				$('#save').resetForm();
				$(document.save.eleBasicId).val('');
				$(document.save.eleCode).val('');
				$('#save').find('label').empty();
				if(data.eleBasicId != undefined){
					$('#save').json2form(data);
				}else{
					$.dialog.alert('您输入的查询条件不存在！')
				}
			}
		});
		$('#save').ajaxForm({
			dataType:'text',
			success:function(data){
				if(data > 0){
					$.dialog.alert('保存成功！');
				}
			}
		});
	});
	</script>
</body>
</html>
